package com.hongyue.zuoYe;

import java.util.Arrays;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Demo {
    public static void main(String[] args) {
        int[] a = {1, 2, 3, 4, 5, 6};
        IntStream stream = Arrays.stream(a);
        IntStream limit = stream.limit(4);
        limit.forEach(o-> System.out.println());
    }
}
